/* eslint-disable  @typescript-eslint/no-explicit-any */

import { AxiosRequestConfig } from 'axios';

import { requestInstance, BaseResponse } from './request';

export function get<T = any, U = any>(config: AxiosRequestConfig, url: string, parms?: U): Promise<BaseResponse<T>> {
    return requestInstance({ ...config, url, method: 'GET', params: parms });
}

export function post<T = any, U = any>(config: AxiosRequestConfig, url: string, data: U): Promise<BaseResponse<T>> {
    console.log('🚀 ~ data:', data);
    return requestInstance({ ...config, url, method: 'POST', data: data });
}
